// 存放本地信息
// 1.1 token 存放cookie
import Cookies from 'js-cookie'
export const setToken = (token) => {
  Cookies.set('dkd_token', token)
}
export const getToken = () => Cookies.get('dkd_token')
export const removeToken = () => {
  Cookies.remove('dkd_token')
}
// 存放用户id
export const setId = (id) => {
  Cookies.set('dkd_userId', id)
}
export const getId = () => Cookies.get('dkd_userId')
export const removeId = () => {
  Cookies.remove('dkd_userId')
}
// // 用户信息存放localStorage
// export const setUserInfo = (userInfo) => {
//   localStorage.setItem('dkd_userInfo', JSON.stringify(userInfo))
// }
// export const getUserInfo = () => JSON.parse(localStorage.getItem('dkd_userInfo'))
// export const removeUserInfo = () => {
//   localStorage.removeItem('dkd_userInfo')
// }
